/**
 * tjftp -- A simple FTP server, using the ANSI C
 * Copyright (C) 2011  degui.chen <degui.chen@qq.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef SETTINGS_H_
#define SETTINGS_H_

#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>

typedef struct _settings {
	char config_file[255];
	int bind_port;
	int data_port;
	char log_file[255];
	char document_root[255];
	int listen_queue_max_length;
	int max_process;
	uid_t uid;
	gid_t gid;
} Settings, *PSettings;

PSettings tj_settings_create(int argc, char* argv[]);
void tj_settings_dump(PSettings settings);
PSettings tj_settings_init();
void tj_settings_destory(PSettings settings);
void tj_settings_cmd_opton(PSettings settings, int argc, char* argv[]);
void tj_settings_file_option(PSettings settings);
#endif /* SETTINGS_H_ */
